package com.ruibang.glass.equipment.time;


import com.ruibang.glass.equipment.service.PointCheckPlanService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
@Slf4j
public class DevicePointCheckTime {

    @Autowired
    private PointCheckPlanService pointCheckPlanService;

//    @Scheduled(cron = "0/60 * * * * ?")
//    public void saveByDay() {
//        try {
//            pointCheckPlanService.checkByDayPoint();
//        } catch (Exception e) {
//            log.error("处理失败:{} ex:{}", "点检计划记录生成异常", e.getMessage());
//            e.printStackTrace();
//        }
//        System.out.println("=====================");
//    }

//    @Scheduled(cron = "0/60 * * * * ?")
//    public void saveByWeek() {
//        try {
//            pointCheckPlanService.checkByWeekPoint();
//        } catch (Exception e) {
//            log.error("处理失败:{} ex:{}", "点检计划记录生成异常", e.getMessage());
//            e.printStackTrace();
//        }
//        System.out.println("=====================");
//    }
//
//    @Scheduled(cron = "0/60 * * * * ?")
//    public void saveByMonth() {
//        try {
//            pointCheckPlanService.checkByMonthPoint();
//        } catch (Exception e) {
//            log.error("处理失败:{} ex:{}", "点检计划记录生成异常", e.getMessage());
//            e.printStackTrace();
//        }
//        System.out.println("=====================");
//    }
//
//
//    @Scheduled(cron = "0/60 * * * * ?")
//    public void saveByYear() {
//        try {
//            pointCheckPlanService.checkByYearPoint();
//        } catch (Exception e) {
//            log.error("处理失败:{} ex:{}", "点检计划记录生成异常", e.getMessage());
//            e.printStackTrace();
//        }
//        System.out.println("=====================");
//    }

}
